var host = "http://igry.uz"; var url = location.href.replace(location.search, ""); var global_game_count = 1; var hitgames = 0; document.write(''); function games_start() { document.write('
'); } function games_end() { document.write('
'); } function separator() { document.write('
'); } function genres_list(genres, current) { if( !current ) { hitgames = 1; document.write('
'); document.write('Все жанры'); document.write('
'); } else document.write('Все жанры'); document.write('
'); var i=0; for (genre in genres) { i++; var css_class = "genre_new"; document.write('
'); if (genres[genre]['code'] === current) { document.write('
'); document.write('' + genres[genre]['title'] + ''); document.write('
'); } else //document.write('' + genres[genre]['title'] + ''); document.write('' + genres[genre]['title'] + ''); document.write('
'); if( i < genres.length ) document.write('
'); } /*var online_class = (current == 'online')?'_active':''; document.write('
'); if( current == 'online' ) document.write('
'); document.write('Онлайн'); if( current == 'online' ) document.write('
'); document.write('
');*/ } function games_list(games, type, s) { if (s == undefined) { s = true; } if (games.length > 0) { document.write('
'); for (game in games) { game_info(games[game], type, global_game_count); } document.write('
'); if (s) { separator(); } } } function game_info(game, type, num) { var details = "?details=" + game['id']; var download = download_game(game['id']); switch (type) { case "big": global_game_count++; return game_big(game, details, download, num); case "medium": return game_medium(game, details, download); case "small": return game_small(game, details); default: return false; } } function game_big(game, details, download, num) { if( num == 1 ) { document.write('
'); document.write('
'); document.write('
'); document.write(' '); document.write(' ' + game['name'] + ''); document.write('
' + game['medium_description'] + '
'); document.write(' Подробнее |'); document.write(' Скачать'); document.write('
'); document.write('
'); document.write('
'); } else { document.write('
'); document.write(' '); document.write(' ' + game['name'] + ''); document.write('
' + game['medium_description'] + '
'); document.write(' Подробнее |'); document.write(' Скачать'); document.write('
'); } } function game_medium(game, details, download) { document.write('
'); document.write(' '); document.write(' ' + game['name'] + ''); document.write(' Скачать'); document.write('
'); } function game_small(game, details) { document.write('
'); document.write(' ' + game['name'] + ''); document.write('
'); } function game_details(data, logo) { document.write('
'); document.write('
'); if (logo != undefined) { document.write(' logo
'); } document.write(' Скачать игру'); document.write(' Размер файла: ' + data['size']); document.write('
'); document.write('

' + data['name'] + '

'); //document.write('
'); //document.write('

' + data['description'] +'

'); //document.write('
'); //document.write('
' + data['full_description']); //document.write('
'); //document.write('') document.write(data['full_description']); //document.write('') //document.write('
'); document.write('
'); //for( small in image_small ) document.write('
'); if( image_small.length > 0 ) { document.write('

Фрагменты из игры

'); for(i=0; i '); } } } function game_not_found() { document.write('
'); document.write('

Данная игра отсутвует в базе. Возможно она была удалена.

'); document.write('
'); } function download_game(id) { return host + "/download/" + partner + "/" + id; } function show_description() { var target1 = document.getElementById('short_description'); var target2 = document.getElementById('full_description'); var button = document.getElementById('btn_description'); target1.style.display = (target1.style.display == 'none') ? 'block' : 'none'; target2.style.display = (target2.style.display == 'block') ? 'none' : 'block'; button.innerHTML = (target1.style.display == 'none') ? 'Скрыть' : 'Подробнее..'; }